package com.tarena.lbs.basic.web.filters;

import com.tarena.lbs.common.passport.principle.UserPrinciple;

public class ThreadLocalUtils {
    public static final ThreadLocal<UserPrinciple> THREAD_LOCAL = new ThreadLocal<>();


    public static void setValue(UserPrinciple userPrinciple){
        THREAD_LOCAL.set(userPrinciple);
    }

    public static UserPrinciple getValue(){
        return THREAD_LOCAL.get();
    }

    public static void remove(){
        THREAD_LOCAL.remove();
    }

}
